import { request } from '../request/request.js'

//  获取环线下面的景点
export const GetscenicList = () => {
    return request.get('/customized/scenicList');
}

// 定制表基础信息生成
export const Getorder = (list,id) => {
    return request.get(`/customized/orderBack?scenery_list=${list}&userid=${id}`);
}

// 获取推荐商品
export const GetgetRecommendation = (list) => {
    return request.get(`/customized/getRecommendation?scenic_List=${list}`);
}

// 定制酒店信息展示
export const Getshow = (scenicid) => {
    return request.get(`/customized/hotel/show?scenicid=${scenicid}`);
}

// 定制酒店信息详细展示
export const Getdetail = (hotelid) => {
    return request.get(`/customized/hotel/detail?hotelid=${hotelid}`);
} 

// 管家信息查询
export const Getguide = () => {
    return request.get(`/customized/guide`);
} 

// 定制表日程安排新增-对应环线景区信息查询
export const Getloops = (loopid) => {
    return request.get(`/customized/loops/show?loopid=${loopid}`);
} 

//定制行程新增行程-写入数据库
export const PutInfoSave = (itemFrom) => {
    return request.put(`/customized/InfoSave`,itemFrom);
} 

//定制人数和日期的查询
export const Getnumber = (orderid) => {
    return request.get(`/customized/number/show?orderid=${orderid}`);
} 

// 定制表日程安排删除
export const Deleteorderdelete = (orderid,day) => {
    return request.delete(`/customized/delete?orderid=${orderid}&day=${day}`);
}

// 定制人数和日期的查询
export const Getnumbershow = (orderid) => {
    return request.get(`/customized/number/show?orderid=${orderid}`);
}

// 定制人数和日期修改
export const Putrevise= (itemFrom) => {
    return request.put(`/customized/number/revise`,itemFrom);
}

//定制详情数据查询
export const GetTripData = (orderid) => {
    return request.get(`/customized/order/show?orderid=${orderid}`);
} 

// 咨询单提交
export const postTrip = (orderid) => {
    return request.post(`/customized/user/order/post?order_id=${orderid}`);
} 
//定制详情数据查询
export const GetTripSenceinfo = (science_id,userid) => {
    return request.get(`/customized/scenicinfo?science_id=${science_id}&user_id=${userid}`);
} 
// 定制订单提交
export const orderBackPost = (itemform) => {
    return request.post(`/customized/orderBack/post`,itemform);
} 
// 获取定制提交咨询前的行程景点卡片数据
export const GetcustomizedScienceList= (list) => {
    return request.get(`/customized/scenic?science_ids=${list}`);
}
// 定制订单的详情内容回显
export const GetCustomizedDetail = (customized_id) => {
    return request.get(`/customized/detail?id=${customized_id}`);
} 
//定制订单报价后的支付
export const customizedPay = (itemform) => {
    return request.post(`/customized/pay`,itemform);
} 
//定制订单申请退款接口
export const customRefund= (itemFrom) => {
    return request.put(`/customized/applyRefund`,itemFrom);
}